<!doctype html>
<html>
    <head>
    <meta charset="utf-8">
    <title>登录-ibeginner</title>

    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="__PUBLIC__/FlatUI/js/vendor/jquery.min.js"></script>
    <script src="__PUBLIC__/login/login.js"></script>

     <!-- 版本不同，只能另外引入 -->
    <link href="__PUBLIC__/login/bootstrap.min.css" rel="stylesheet">

    <!--    <link href="bootstrap.min.css" rel="stylesheet">-->
    <link href="__PUBLIC__/login/style.css" rel="stylesheet">

<!--    <script src="__PUBLIC__/js/home/login_register.js"></script>-->
    <script type="text/javascript">
        function ckeckForm() {
            // 'loginForm'
            var username = $("#username").val();  //获取用户名
            var password = $("#password").val();  //获取密码
            //alert("password:" + password);
            if ("" == username) {
            //alert("username:" + username);
                // 把用户名输入框的边框设置为红色
                $("#username").css("border", "1px solid #ff0000");
                $("#username").attr('placeholder',"请输入用户名");
                return false;
            }

            if ("" == password) {
                // 把密码输入框的边框设置为红色
                $("#password").css("border", "1px solid #ff0000");
                $("#password").attr('placeholder',"请输入密码");
                
                return false;
            }
            
            $("#loginform").submit(); 
        }
        
    </script>
        
    <style type="text/css">
   
    </style>
    </head>
    
    <body>
    <div id="loginbox">
        <form id="loginform" method="post" class="form-vertical" action="{:U('Home/Index/login')}" onsubmit="return ckeckForm();">
            <div class="control-group normal_text">
                <h1><img src="__PUBLIC__/images/logo/1155606.png" 
                         style="margin:0; padding:0;margin-top:-8px;" height="32px" width="32px">ibeginner</h1>
            </div>
            <div class="control-group">
                <div class="controls">
                    <div class="main_input_box">
                        <span class="add-on bg_lg"><i class="icon-user"></i></span>
                        <input name="username" id="username" type="text" placeholder="用户名" value="{$username}">
                    </div>
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    <div class="main_input_box">
                        <span class="add-on bg_ly"><i class="icon-lock"></i></span>
                        <input name="password" type="password" id="password" placeholder="密码">
                    </div>
                </div>
            </div>
            <div style="text-align: center;"><font color="red">{$tipInfo}</font></div>
            <div class="form-actions">
                <span class="pull-left"><a href="#" class="flip-link btn btn-info" id="to-recover">忘记密码？</a></span>
<!--                <span class="pull-right"><a href="#" class="btn btn-success"> 注册</a></span>-->
                <span class="pull-right"><button type="submit" class="btn btn-success"> 登陆</button></span>
            </div>
        </form>
<!--        忘记密码 -->
        <form id="recoverform" action="" class="form-vertical">
            <p class="normal_text" style='font-family: "Helvetica Neue", "Helvetica", "Microsoft YaHei", "STXIHEI", "Arial", "sans-serif";'>请输入您注册时使用的用户名和邮箱！</p>

            <div class="controls">
                <div class="main_input_box">
                    <span class="add-on bg_lg"><i class="icon-user"></i></span>
                    <input name="userid" type="text" placeholder="Username">
                </div>
                <div class="main_input_box">
                    <span class="add-on bg_lo"><i class="icon-envelope"></i></span>
                    <input type="text" name="mail" placeholder="E-mail地址">
                </div>
            </div>

            <div class="form-actions">
                <span class="pull-left"><a href="#" class="flip-link btn btn-success" id="to-login">« 返回登陆</a></span>
                <span class="pull-right"><button type="submit" class="btn btn-info">找回</button></span>
            </div>
        </form>
    </div>

</body>
</html>